package input;

import instance.Instance;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.LinkedList;
import java.util.List;

public class Problem2Input implements Input {

	private String inputFile;
	private LinkedList<Instance> instances;
	
	public Problem2Input(String inputFile) {
		this.inputFile = inputFile;
	}
	
	@Override
	public void readFile() throws Exception {
		BufferedReader bufferedReader = new BufferedReader(new FileReader(new File(inputFile)));
		instances = new LinkedList<Instance>();
		while (bufferedReader.ready()) {		//voy leyendo las instancias y las guardo en la lista
			Instance instance =  readInstance(bufferedReader);
			instances.add( instance );
		}
		
		bufferedReader.close();
	}

	@Override
	public List<Instance> getInstances() {
		
		return null;
		
	}

	@Override
	public Instance readInstance(BufferedReader bufferedReader)	throws Exception {
		// 
		return null;
	}

}
